//
//  WMVungleTools.h
//  WonderMobSDK
//
//  Created by zero on 2021/6/9.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@protocol WMVungelFullAdDelegate <NSObject>

@optional

/// 全屏广告加载状态回调
/// @param isAdPlayable 广告是否有效
/// @param placementID 广告位ID
/// @param error 错误信息
- (void)wm_vungleFullAdPlayabilityUpdate:(BOOL)isAdPlayable placementID:(nullable NSString *)placementID error:(nullable NSError *)error;
 
/// 全屏广告开始播放
/// @param placementID 广告位ID
- (void)wm_vungleFullAdDidShowAdForPlacementID:(nullable NSString *)placementID;

/// 全屏广告被点击
/// @param placementID 广告位ID 实例
- (void)wm_vungleFullAdTrackClickForPlacementID:(nullable NSString *)placementID;

/// 全屏广告被关闭
/// @param placementID 广告位ID 实例
- (void)wm_vungleFullAdDidCloseAdForPlacementID:(nonnull NSString *)placementID;

@end

@protocol WMVungelRewardAdDelegate <NSObject>

@optional
/// 激励广告加载状态回调
/// @param isAdPlayable 广告是否有效
/// @param placementID 广告位ID
/// @param error 错误信息
- (void)wm_vungleRewardedAdPlayabilityUpdate:(BOOL)isAdPlayable placementID:(nullable NSString *)placementID error:(nullable NSError *)error;

/// 视频广告视频展示成功
/// @param placementID 广告位ID
- (void)wm_vungleRewardedAdDidShowAdForPlacementID:(nullable NSString *)placementID;

/// 视频广告播且放达到激励条件回调
/// @param placementID 广告位ID
- (void)wm_vungleRewardUserForPlacementID:(nullable NSString *)placementID;

/// 视频广告被点击
/// @param placementID 广告位ID
- (void)wm_vungleRewardedAdTrackClickForPlacementID:(nullable NSString *)placementID;

/// 关闭了广告视频
/// @param placementID 广告位ID 实例
- (void)wm_vungleRewardedAdDidCloseAdForPlacementID:(nonnull NSString *)placementID;

@end

@interface WMVungleTools : NSObject

+ (instancetype)sharedInstance;

// 1 为激励，2为全屏
@property (nonatomic, assign) NSUInteger showType;

/// 委托对象
@property (nonatomic, weak) id<WMVungelFullAdDelegate> fullDelegate;

/// 委托对象
@property (nonatomic, weak) id<WMVungelRewardAdDelegate> rewardDelegate;

@end

NS_ASSUME_NONNULL_END
